home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
batchut
/
batkit50.zip
/
BATKIT.DOC
< prev
next >
Wrap
Text File
|
1988-08-23
|
33KB
|
700 lines
BatKit
Utilities for
Menus in Batch Files
by
Ken Hipple
[74076,2331]
All Right Reserved
[Including: GetKey, SaveDir, and Wait]
Copyright 1988 by
Mississippi Data Equipment Company, Inc.
625C Lakeland East Drive
Jackson, MS 39208
(601) 932-6332
BatKit ver. 5.0 7/15/88 Page: 2
T A B L E O F C O N T E N T S
GETKEY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
OVERVIEW . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
USING GETKEY . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Usage
Response Editing
COMMAND LINE PARAMETERS . . . . . . . . . . . . . . . . . . . . . 5
DISPLAYING TEXT . . . . . . . . . . . . . . . . . . . . . . . . . 8
# control character
@ control character
GETKEY 4.x AND GETSTRNG COMPATIBILITY . . . . . . . . . . . . . . . 11
WAIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
SAVEDIR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
USING THE DOS ENVIRONMENT . . . . . . . . . . . . . . . . . . . . . 14
REGISTERING BatKit . . . . . . . . . . . . . . . . . . . . . . . . 15
BatKit ver. 5.0 7/15/88 Page: 3
GETKEY OVERVIEW:
GetKey is a utility program designed to be used in a batch file. Its
main function is to make batch files interactive by allowing the user to
enter a response to a prompt or question. Used with an appropriate text
file and batch file it can be the basis of a menu system. Other uses
include displaying text files and messages, playing tones, clearing
screens larger than 80x25, and providing a 'hidden' escape method from a
batch file.
GetKey enables you to use a single batch (BAT) file and a single text
file to completely control the operation of a system from startup to
shutdown.
GetKey has been tested with DOS versions from 2.1 to 3.3. It will run
on most IBM PCs and compatibles. Features of GetKey include:
- Returns an ERRORLEVEL for all - Option to wait for RETURN key
keys including function keys before accepting a response
- Option to insert response - Can wait a given time for a
into the environment response and then continue
- Fast text display & screen - Can display a file, message or
handling both
- Optional response echoing - Can display a section of a file
- Optional bad response message - Flexible color handling
- Option to delete bad responses - Time and date display options
- Optional beep on bad response - Does display delays and pauses
- Built-in help screens - 'Smart' clear screen function
- Clear type-ahead buffer option - Limited screen mode switching
- Tone generation capabilities - Optional response validation
- Adjustable max. response length - Can trim spaces from response
- Option to force uppercase - Defaults can be modified
BatKit ver. 5.0 7/15/88 Page: 4
USING GETKEY:
When GetKey is run it first displays any file or message specified,
then waits for the user to enter a response. You can specify the
maximum length allowed. After the response is entered it is validated
if necessary. The ASCII value of the first letter of the response is
then returned to the batch file in ERRORLEVEL. The response can also be
placed into the environment if you want. The values returned by func-
tion keys are their extended ASCII value plus 128. These values are:
F1-F10 SHIFT F1-F10 CTRL F1-F10 ALT F1-F10
Value Returned: 187-196 212-221 222-231 232-241
Usage:
GetKey [?] [/A] [/B] [/C] [/D] [/E] [/F"filename[@s]"] [/G["char"]]
[/H] [/I] [/K"chars" | /KF"filename[@s]"] [/Lnnn] [/M"msg"]
[/N["char"]] [/O] [/P] [/R] [/S] [/T] [/U] [/V["var"]]
[/Wnnnn] [/X] [/Z]
Items in [] are optional. The character | means or (for example, you
can use /K or /KF but not both together). Most parameters can have a +
or - appended to them (ex. /B- or /G+"*"). See below for which para-
meters can use this. Note that any place GetKey expects a number you
may enter it in decimal or hexadecimal. To use hexadecimal add a & in
front of the number. For example, to GetKey &A0 is the same as 160.
Arguments enclosed in quotes (") above MUST be enclosed in quotes on
the command line.
Response Editing:
The following keys can be used during response entry for editing:
Home - Returns the cursor to the first character of the
response.
End - Moves the cursor to the right end of the response.
Left Arrow - Moves the cursor one space to the left.
Right Arrow - Moves the cursor one space to the right.
Ins - Toggles Insert/Overstrike mode. Insert mode is indicated
by a large cursor.
Del - Deletes the character under the cursor.
BackSpace - Deletes the character to the left of the cursor.
Esc - Deletes the entire response.
BatKit ver. 5.0 7/15/88 Page: 5
COMMAND LINE PARAMETERS for GetKey: (The value in [] after some defini-
tions is the "initial" default for that parameter. That is, the action
for that parameter if the switch is not included in the command line.
If the default is [off], the switch would change it to ON. Most of
these initial defaults can be changed by using the /O switch to patch
GETKEY.EXE. Toggles can also be forced ON or OFF using + or -.)
/A - Makes the RETURN key be one of the Acceptable responses for GetKey
(see /K and /KF). If not used with the /K|/KF parameter it makes
the RETURN key be the only acceptable response. [off]
/B - Toggles the setting for the error Beep produced by an invalid
response to GetKey (see /K|/KF) and Ctrl-G beeps. [on]
/C - Toggles the Clear screen setting. If no color setting has been
done the original screen colors or attributes are used; otherwise
the last color that was set is used. GetKey determines the
original screen colors by looking at the attributes at the cursor
position that was current when GetKey was called. This means that
the color the cursor is when you invoke GetKey is the color it
thinks the screen is. [off]
/D - Toggles the 'Delete (erase) unacceptable response' setting (see
/K|/KF). [off]
/E - Toggles the setting for displaying an Error message when the user
enters an unacceptable response (see /K|/KF). [off]
/F - Causes GetKey to display the File "filename". Using the syntax
"filename@s" causes GetKey to display only section s of the file.
See 'Displaying Text' below for more information.
/G - Toggles the setting for a Guide line. When ON, it displays a
guide line showing the length of the maximum acceptable response.